package homework.spring.eg101;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class Product {
    @Value("小米汽车")
    private  String title;
    @Value("21990")
    private  Integer num;
    private  String comment;

    public void setTitle(String title) {
        this.title = title;
    }

    public void setNum(Integer num) {
        this.num = num;
    }
@Value("保时米")
    public void setComment(String comment) {
        this.comment = comment;
    }

    @Override
    public String toString() {
        return "Product{" +
                "title='" + title + '\'' +
                ", num=" + num +
                ", comment='" + comment + '\'' +
                '}';
    }
}
